<div class="doc-item" id="doc-725"><h2 class="doc-item-name">create-server<span class="namespace">(clojure.contrib.server-socket)</span></h2><ul class="var-arglists"><li>(<span class="var-name">create-server</span> port fun backlog bind-addr)</li><li>(<span class="var-name">create-server</span> port fun backlog)</li><li>(<span class="var-name">create-server</span> port fun)</li></ul><div class="var-docstring"><p>Creates a server socket on port. Upon accept, a new thread is
  created which calls:</p><p>(fun input-stream output-stream)</p><p>Optional arguments support specifying a listen backlog and binding
  to a specific endpoint.</p></div><div class="var-source"><pre>; clojure/contrib/server_socket.clj:53
(defn create-server 
  ([port fun backlog #^InetAddress bind-addr] 
     (create-server-aux fun (ServerSocket. port backlog bind-addr)))
  ([port fun backlog]
     (create-server-aux fun (ServerSocket. port backlog)))
  ([port fun]
     (create-server-aux fun (ServerSocket. port))))</pre></div><div class="license"><p>Copyright (c) Rich Hickey. All rights reserved.</p><p>The use and distribution terms for this software are covered by the <a href="http://opensource.org/licenses/eclipse-1.0.php">Eclipse Public License 1.0</a>, which can be found in the file
          epl-v10.html at the root of this distribution. By using this software
          in any fashion, you are agreeing to be bound by the terms of this
          license. You must not remove this notice, or any other, from this
          software.</p></div></div>